/**
 * 创建人:  @author huangpeng
 * 创建时间:  2023年11月05日 15:34
 * 项目名称:  lemon-blog-cloud
 * 文件名称:  BiEmail
 * 文件描述:  @Description: 邮件信息实体类
 * <p>
 * All rights Reserved, Designed By huangpeng
 * @Copyright: 2021-2023
 *
 */
package com.lemon.message.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lemon.common.core.annotation.Excel;
import com.lemon.common.core.base.BaseEntity;
import com.lemon.common.core.serializer.JsonLongDeserializer;
import com.lemon.common.core.serializer.JsonLongSerializer;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * 包名称：com.lemon.message.domain
 * 类名称：BiEmail
 * 类描述：邮件信息实体类
 * 创建人：@author huangpeng
 * 创建时间：2023年11月05日 15:34
 */
public class BiEmail extends BaseEntity implements Serializable {

    /**
     * 序列化
     */
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long id;

    /**
     * 使用的邮件模板编码
     */
    @Excel(name = "邮件模板编码")
    private String templateCode;

    /**
     * 发件人
     */
    @Excel(name = "发件人")
    private String fromEmail;

    /**
     * 邮件主题
     */
    @Excel(name = "主题")
    private String subject;

    /**
     * 邮件内容
     */
    @Excel(name = "内容")
    private String content;

    /**
     * 收件人邮箱，多个;隔开
     */
    @Excel(name = "收件人")
    private String toEmail;

    /**
     * 抄送人邮箱，多个;隔开
     */
    @Excel(name = "抄送人")
    private String ccEmail;

    /**
     * 密送人邮箱，多个;隔开
     */
    @Excel(name = "密送人")
    private String bccEmail;

    /**
     * 发送状态
     */
    @Excel(name = "发送状态", dictType = "sys_email_status")
    private String dvSendStatus;

    /**
     * 发件服务器id
     */
    @Excel(name = "服务器id")
    private String smtpid;

    /**
     * 附件地址，多个;隔开
     */
    @Excel(name = "附件地址")
    private String attachUrl;

    /**
     * 邮件url附件
     */
    private List<String> attachUrlList;

    /**
     * 邮件附件,本地文件上传
     */
    private List<MultipartFile> attachFileList;

    /**
     * 邮件内联附件,本地文件上传
     */
    private List<MultipartFile> inlineFileList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTemplateCode() {
        return templateCode;
    }

    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }

    public String getFromEmail() {
        return fromEmail;
    }

    public void setFromEmail(String fromEmail) {
        this.fromEmail = fromEmail;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getToEmail() {
        return toEmail;
    }

    public void setToEmail(String toEmail) {
        this.toEmail = toEmail;
    }

    public String getCcEmail() {
        return ccEmail;
    }

    public void setCcEmail(String ccEmail) {
        this.ccEmail = ccEmail;
    }

    public String getBccEmail() {
        return bccEmail;
    }

    public void setBccEmail(String bccEmail) {
        this.bccEmail = bccEmail;
    }

    public String getDvSendStatus() {
        return dvSendStatus;
    }

    public void setDvSendStatus(String dvSendStatus) {
        this.dvSendStatus = dvSendStatus;
    }

    public String getSmtpid() {
        return smtpid;
    }

    public void setSmtpid(String smtpid) {
        this.smtpid = smtpid;
    }

    public String getAttachUrl() {
        return attachUrl;
    }

    public void setAttachUrl(String attachUrl) {
        this.attachUrl = attachUrl;
    }

    public List<String> getAttachUrlList() {
        return attachUrlList;
    }

    public void setAttachUrlList(List<String> attachUrlList) {
        this.attachUrlList = attachUrlList;
    }

    public List<MultipartFile> getAttachFileList() {
        return attachFileList;
    }

    public void setAttachFileList(List<MultipartFile> attachFileList) {
        this.attachFileList = attachFileList;
    }

    public List<MultipartFile> getInlineFileList() {
        return inlineFileList;
    }

    public void setInlineFileList(List<MultipartFile> inlineFileList) {
        this.inlineFileList = inlineFileList;
    }

    @Override
    public String toString() {
        return "BiEmail{" +
                "id=" + id +
                ", templateCode='" + templateCode + '\'' +
                ", fromEmail='" + fromEmail + '\'' +
                ", subject='" + subject + '\'' +
                ", toEmail='" + toEmail + '\'' +
                ", ccEmail='" + ccEmail + '\'' +
                ", bccEmail='" + bccEmail + '\'' +
                ", dvSendStatus='" + dvSendStatus + '\'' +
                ", smtpid='" + smtpid + '\'' +
                ", attachUrl='" + attachUrl + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BiEmail email = (BiEmail) o;
        return Objects.equals(id, email.id) && Objects.equals(templateCode, email.templateCode) && Objects.equals(fromEmail, email.fromEmail) && Objects.equals(subject, email.subject) && Objects.equals(content, email.content) && Objects.equals(toEmail, email.toEmail) && Objects.equals(ccEmail, email.ccEmail) && Objects.equals(bccEmail, email.bccEmail) && Objects.equals(dvSendStatus, email.dvSendStatus) && Objects.equals(smtpid, email.smtpid) && Objects.equals(attachUrl, email.attachUrl) && Objects.equals(attachUrlList, email.attachUrlList) && Objects.equals(attachFileList, email.attachFileList) && Objects.equals(inlineFileList, email.inlineFileList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, templateCode, fromEmail, subject, content, toEmail, ccEmail, bccEmail, dvSendStatus, smtpid, attachUrl, attachUrlList, attachFileList, inlineFileList);
    }
}
